home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / AppleEvents / Records / AEMember.cp next >
Text File  |  2000-06-23  |  713b  |  37 lines

  1. // AEMember.cp
  2.  
  3. #ifndef AEMember_h
  4. #include "AEMember.h"
  5. #endif
  6. #ifndef OSError_h
  7. #include "OSError.h"
  8. #endif
  9. #ifndef ConstData_h
  10. #include "ConstData.h"
  11. #endif
  12. #ifndef AEStruct_h
  13. #include "AEStruct.h"
  14. #endif
  15.  
  16. void AEMember::Remove()
  17.   {
  18.     Assert( !Record().IsNull() );
  19.     ThrowOSError( AEDeleteKeyDesc( &Record(), Key().Key() ) );
  20.   }
  21.  
  22. void AEMember::operator=( const AEDescriptor& in )
  23.   {
  24.     Assert( !Record().IsNull() );
  25.     ThrowOSError( AEPutKeyDesc( &Record(), Key().Key(), &in ) );
  26.   }
  27.  
  28. void AEMember::Set( AEType type, ConstData data )
  29.   {
  30.     Assert( !Record().IsNull() );
  31.     ThrowOSError( AEPutKeyPtr( &Record(),
  32.                                         Key().Key(),
  33.                                         type.Type(),
  34.                                         data.Start(),
  35.                                         data.Length() ) );
  36.   }
  37.